﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace WpfExample
{
  public class ViewModel
  {
    public ObservableCollection<Person> Persons
    {
      get { return _Persons; }
      set
      {
        _Persons = value;
      }
    }
    private ObservableCollection<Person> _Persons;


    public ViewModel()
    {
      Persons = new ObservableCollection<Person>()
      {
        new Person {
          FirstName="Daniel", LastName="Turan", BirthDate=new DateTime(1987,8,19),
          Items = new ObservableCollection<string>{ "item1", "item2", "item3","item4","item5","item6","item7"},
        },
        new Person { FirstName="John", LastName="Smith", BirthDate=new DateTime(1958,8,29), VIP=true},
        new Person { FirstName="Bill", LastName="Gates", BirthDate=new DateTime(1955,10,28)}
      };
    }
  }
}
